<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Log/index')}">日志列表</a></li>
    </ul>
    <table class="table table-hover table-bordered margin-top-20">
        <thead>
        <tr>
            <th>日志ID</th>
            <th>操作ID</th>
            <th>操作时间</th>
            <th>操作描述</th>
            <th>操作数据</th>
            <th>操作状态</th>
            <th>操作前数据</th>
            <th>{:lang('ACTIONS')}</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="data" item="vo">
            <tr>
                <td>{$vo.id}</td>
                <td>操作ID:{$vo.operate_id}</td>
                <td>{:date('Y-m-d H:m:s',$vo.operate_time)}</td>
                <td>{$vo.action}</td>
                <td><input type="button" value="查看数据" data='{$vo.json_data|default=""}' class="btn btn-primary" /></td>
                <td>{$vo.result}</td>
                <td><input type="button" value="查看数据" data='{$vo.old_data|default=""}' class="btn btn-primary" /></td>
                <td></td>
            </tr>
        </foreach>
        </tbody>
    </table>

    <div class="pagination">{$page|default=''}</div>

</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
	$(function(){
		$("input").click(function(){
			var data = $(this).attr("data");
			var out_data = '';
			if(data == ''){
				out_data = '没有数据！';
			}
			else{
				var decode_data = $.parseJSON(data);
				$.each(decode_data,function(key,val){
					out_data = out_data + key + ':' +val + '\n';
				});
			}
			alert(out_data);
		});
	});
</script>
</body>
</html>
